<?php

namespace app\admin\controller\information;

use app\common\controller\Backend;

/**
 * 会员组管理
 *
 * @icon fa fa-users
 */
class Banner extends Backend
{

    /**
     * @var \app\manage\model\IndexBanner
     */
    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = model('InformationBanner');
        $this->view->assign("statusList", $this->model->getStatusList());
    }

    public function index()
    {
        $this->searchFields = ['title', 'link'];
        return parent::index();
    }

    public function add()
    {
        return parent::add();
    }

    public function edit($ids = NULL)
    {
        $row = $this->model->get($ids);
        if (!$row)
            $this->error(__('No Results were found'));
        return parent::edit($ids);
    }

}
